home *** CD-ROM | disk | FTP | other *** search
/ Clinical Endocrinology / Clinical Endocrinology.iso / mac / 00000000 / 01000000 / 01040000 / 01040000.dir / 00017_Script_17 < prev    next >
Text File  |  1995-11-09  |  1KB  |  41 lines

  1. -- This is the first handler called at the start. It sets up all
  2. -- the global variables as needed. It sets the counting of pages
  3. -- to 1. It initialises the variables needed to calculate the
  4. -- sliding page counter. It puppets the slider and counter.
  5.  
  6. on init
  7.   
  8.   global firstPage, lastPage, numOfPages, theLeft, theRight
  9.   global targetPage, Slider, slideNum, pageRange
  10.   global textChannel, numberAlign, firstQDPage, lastQDPage
  11.   --freeBytesTest
  12.   --puppetSprite 47, true
  13.   --puppetSprite 48, true
  14.   set firstPage = 113
  15.   set lastPage = 113
  16.   set firstQDPage = 121
  17.   set lastQDPage = 121
  18.   set textChannel = 4
  19.   set Slider = 36
  20.   set slideNum = 37
  21.   set trackChannel = 35 
  22.   set targetPage = 1
  23.   set the constraint of sprite Slider to trackChannel
  24.   set theLeft = the left of sprite trackChannel
  25.   set theRight = the right of sprite trackChannel 
  26.   set numberAlign = the locH of sprite Slider ┬
  27. - the locH of sprite slideNum
  28.   set pageRange = theRight - theLeft
  29.   
  30.   set numOfPages = float( lastPage - firstPage ) -- total pages
  31.   
  32.   put "1/"& ( lastPage - firstPage ) + 1 into field "Readout"
  33.   
  34.   puppetSprite Slider , true
  35.   puppetSprite slideNum, true
  36.   setDisk 
  37.   whereAmI
  38.   
  39. end init
  40. -------------------------------------------------
  41.